package me.mononin.factory.preseneter.message;

import java.util.List;

import me.mononin.common.factory.presenter.BaseContract;
import me.mononin.factory.model.db.Group;
import me.mononin.factory.model.db.Message;
import me.mononin.factory.model.db.User;
import me.mononin.factory.model.db.view.MemberUserModel;

public interface ChatContract {

    interface Presenter extends BaseContract.Presenter{
        //发送普通文字消息
        void pushText(String content);

        //发送语音消息
        void pushAudio(String path,long time);

        //发送图片消息
        void pushPicture(String[] paths);

        //重新发送消息
        boolean rePush(Message message);
    }

    //界面基类
    interface View<InitModel> extends BaseContract.RecyclerView<Presenter,Message>{
        //初始化Model
        void onInit(InitModel model);
    }

    //普通用户聊天界面
    interface UserView extends View<User>{

    }

    //群组聊天界面
    interface GroupView extends View<Group>{
        // 显示管理员菜单
        void showAdminOption(boolean isAdmin);

        // 初始化成员信息
        void onInitGroupMembers(List<MemberUserModel> members, long moreCount);
    }
}
